#pragma once
#include "DLL.h"
#include "CTemplateSet.h"

namespace DarkStorm2D
{
namespace GraphicsCore
{
	class DLLDARKSTORM2D CAnimation : public IResource
	{
	protected:
		CTemplateSet m_TemplateSet;
		uint m_Frames;
		uint m_CurrentFrame;
		CellID* m_FramesID;
	public:
		CAnimation();
		~CAnimation();

		void Create(CTemplateSet & TemplateSet, uint Frames, CellID* FramesID);
		void Update();
		void Render(float x, float y);
		void SetCurrentFrame(uint Frame);
		uint GetCurrentFrame();

		const CError& LoadFromFile(const std::string & Filename){return CError();}
		const CError& Reload() {return CError();}
	};

	typedef boost::intrusive_ptr<CAnimation> AnimationPtr;
};
};